//
//  GodLesCollectionViewCell.m
//  fp
//
//  Created by xingshuai on 2020/11/13.
//

#import "GodLesCollectionViewCell.h"

@interface GodLesCollectionViewCell ()

@property (nonatomic, strong) UIImageView *schoolImg;       // 学校图标
@property (nonatomic, strong) UILabel *schoolNameLabel;     // 学校名称

@end

@implementation GodLesCollectionViewCell

-(instancetype)initWithFrame:(CGRect)frame {
    if (self = [super initWithFrame:frame]) {
        self.contentView.backgroundColor = [UIColor clearColor];
        
        self.schoolImg = [[UIImageView alloc]init];
        self.schoolImg.image = [UIImage imageNamed:@"def_img"];
        [self.contentView addSubview:self.schoolImg];
        [self.schoolImg mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerX.equalTo(self.contentView);
            make.top.equalTo(self.contentView).offset(10);
            make.size.mas_offset(CGSizeMake(XS_FONT(100), XS_FONT(100)));
        }];
        
        self.schoolNameLabel = [[UILabel alloc]init];
        self.schoolNameLabel.numberOfLines = 2;
        self.schoolNameLabel.text = @"上海外国语大学附属中心小学上海外国语大学附属中心小学";
        self.schoolNameLabel.font = [UIFont pingFangSCWithWeight:FontWeightStyleRegular size:16];
        self.schoolNameLabel.textColor = [UIColor colorWithHexString:@"#606060"];
        [self.contentView addSubview:self.schoolNameLabel];
        [self.schoolNameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(self.contentView).offset(15);
            make.right.equalTo(self.contentView.mas_right).offset(-15);
            make.top.equalTo(self.schoolImg.mas_bottom).offset(15);
        }];
    }
    return self;
}

@end
